<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/common/include/taglibs.jsp"%>
<script type="text/javascript">
$(document).ready(function(){
	
});

function setBoard(brd_no){
	$("#iframeBrd").attr("src", "/board/bd/mg/ubdmg0101Q.do?p_id=${param.p_id}&brd_no="+brd_no);
}

function showLeft(){
	if($("#btnShow").html()=="왼쪽 숨기기"){
		$("#l1").hide();
		$("#l2").attr("width","100%");
		$("#btnShow").html("왼쪽 보이기");
	}else{
		$("#l1").show();
		$("#l2").attr("width","80%");
		$("#btnShow").html("왼쪽 숨기기");
	}
}
</script>
<table width="100%" border="0" cellspacing="0" cellpadding="10">
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td>&nbsp;</td>
        </tr>

		<tr>
          <td height="20" background="/usr/images/res_mbg.gif" bgcolor="#F4F4F4">&nbsp;</td>
        </tr>
		<tr>
          <td>
          	<a href="#" id="btnShow" onclick="showLeft();return false;">왼쪽 숨기기</a>
          </td>
        </tr>
        <tr>
        	<td>
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td id="l1" width="20%" style="vertical-align: top;">
							<ul>
								<c:if test="${list !=null && fn:length(list)>0 }">
									<c:forEach var="map" items="${list}" varStatus="status">
										<li><a href="#" onclick="setBoard('${map.brd_no}');">${map.brd_nm }</a></li>
									</c:forEach>
								</c:if>
							</ul>
						</td>
						<td id="l2" width="80%" style="background-color: #000000;">
								<c:if test="${list !=null && fn:length(list)>0 }">
									<iframe id="iframeBrd" src="/board/bd/mg/ubdmg0101Q.do?p_id=${param.p_id}&brd_no=${list[0].brd_no}" height="500" width="100%" frameborder="0" scrolling="auto" title="" allowTransparency="true">
									</iframe>
								</c:if>
						</td>
					</tr>
				</table>

			</td>
        </tr>
        <tr>
          <td style="padding-top: 2px;"><%@ include file="/WEB-INF/jsp/usr/pe/re/footer.jsp"%></td>
        </tr>
      </table></td>
  </tr>
</table>

<div id="lodingPop" style="position: absolute;left: 50px; top: 50px; display: none;border: 0px;border-color: black;background-color: white;">
	<table border="0" style="border-style: none;">
		<tr>
			<td>
				<div style="" align="center">
						<img src="/usr/images/ajax_loding1_fbisk.gif"/>
				</div>
			</td>
		</tr>
	</table>
</div>
